<%@page import="com.wef.demo.entity.domain.RegionDomain"%>
<%@page import="com.gfa4j.resource.ResourceManagerServer"%>
<%@page import="com.wef.common.util.CommonMessageDomain"%>
<%@page import="com.gfa4j.query.Field"%>
<%@ include file="/pages/common/taglib.jsp"%>
<%@page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta>
		<title></title>
		<%@include file="/styles/css_lib.jsp"%>
		<%@include file="/scripts/widgets/jquery-ui/css_lib.jsp"%>
		<%@include file="/scripts/widgets/ztree/css_lib.jsp"%>
		
		<link rel="stylesheet" type="text/css" href="./demo_tree.css" />
		
		<%@include file="/pages/common/js_global.jsp"%>
		<%@include file="/scripts/sdk/js_lib.jsp"%>
		<%@include file="/scripts/config/js_lib.jsp"%>
		<%@include file="/scripts/utils/js_lib.jsp"%>
		<%@include file="/scripts/i18n/js_lib.jsp"%>
		<%@include file="/scripts/format/js_lib.jsp"%>
		<%@include file="/scripts/validate/js_lib.jsp"%>
		<%@include file="/scripts/widgets/jquery-ui/js_lib.jsp"%>
		<%@include file="/scripts/widgets/ztree/js_lib.jsp"%>
		<%@include file="/scripts/widgets/page-custom/js_lib.jsp"%>
		<script type="text/javascript" src="./demo_tree_singleTable.js"></script>
		
		<k:zTree id="divTree"
			async="{
					url:'${ctx}/demo/region.do?method=queryTreeData',
					isOpen:false,filterDataAfterAsync:exampleDataFilter,
					queryInfo:{queryObjectName:'com.wef.demo.entity.Region'}
			}"
			callback="{
						onClick: zTreeOnClick
			}" />
		
		<script type="text/javascript">
			//App.pageCustomEnable = true;App.pageId = "jqgrid";
			$(window).ready(function() {
				$('div[accordion=true]').accordion({
					collapsible : true
		
				});
				$('div[tabGroup=true]').tabs();
				$('#pageLoadComplete').attr('isComplete', true);
			});
		</script>
	</head>
	<body class="body">
		<div class="container">
			<div class="panel3">
				<div class="ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content-active">
					<ul class="button_box">
						<li><k:button styleId="saveBtnRegion" styleClass="button ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" type="button" text="<%=CommonMessageDomain.BUTTON_SAVE%>" /></li>
						<li><k:button styleId="clearBtnRegion" styleClass="button ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" type="button" text="<%=CommonMessageDomain.BUTTON_CLEAR%>" /></li>
						<li><k:button styleId="deleteBtnRegion" styleClass="button ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" type="button" text="<%=CommonMessageDomain.BUTTON_DELETE%>" /></li>
					</ul>
				</div>
				<div id="divAccordion2" accordion="true">
					<h1>
						<a href="#"><%=ResourceManagerServer.getInstance().getMessage(
						RegionDomain.RegionNLS)%>&nbsp;<%=ResourceManagerServer.getInstance().getMessage(
						CommonMessageDomain.TITLE_EDIT)%></a>
					</h1>
					<div>
						<form id="searchFormRegion" name="searchFormRegion">
							<k:hidden property="regionId" />
							<k:hidden property="recordVersion" />
							<ul id="searchUlRegion" allowChange="true" class="edit_box">
								<li><k:label text="demo.Region.regionCode" /> <k:text property="regionCode" styleClass="text" /></li>
								<li><k:label text="demo.Region.address" /> <k:text property="address" styleClass="text" /></li>
								<li><k:label text="demo.Region.regionName" /> <k:text property="regionName" styleClass="text" /></li>
								<li><k:label text="demo.Region.superRegionName" /> <k:text property="superRegionName" styleClass="text" /></li>
								<li><k:label text="demo.Region.superRegionCode" /> <k:text property="superRegionCode" styleClass="text" /></li>
							</ul>
						</form>
					</div>
				</div>
			</div>
			<div class="panel2">
				<div id="divAccordion1" accordion="true">
					<h1>
						<a href="#"><%=ResourceManagerServer.getInstance().getMessage(
						RegionDomain.RegionNLS)%>&nbsp;<%=ResourceManagerServer.getInstance().getMessage(
						CommonMessageDomain.TITLE_SERACH)%></a>
					</h1>
					<div>
						<div id="divTree" class="ztree" style="height: 390px;"></div>
					</div>
				</div>
			</div>
		</div>
	
		<div id="pageLoadComplete" isComplete="false" style="display: none;"></div>
	</body>
</html>